"""i = 1
while i < 101:
    print("我不喜欢你，小美")
    i += 1"""

"""i = 0
x = 0
while i <100:
    i +=1
    x +=i
    print(x)"""

import random
num = random.randint(a=1,b=100)
guess_num = int(input("输入你猜的数："))
count = 0
flag = True
while flag:
    count += 1
    if guess_num == num:
        print(f"恭喜你对了，我的数是{num}")
        flag = False
    else:
        if guess_num > num:
            print("猜大了")
            guess_num = int(input("再次输入："))
        else:
            print("猜小了")
            guess_num = int(input("再猜一次："))
print(f"你猜了{count}次")

